#ifndef __LOGGERMANAGER_H__
#define __LOGGERMANAGER_H__ 1

#include <map>
#include "Core/Sprocket.h"
#include "Util/Logger.h"

namespace Sprocket {

#define WRITE_LOG(fmt,...) LoggerManager::GetInstance().GetLogger(__NAMESPACE__).Write(__FILE__,__FUNC_SIG__,__LINE__,fmt,#__VA_ARGS__)

class LoggerManager {
public:
    ~LoggerManager();
    
    static LoggerManager& GetInstance();
    
    Logger& GetLogger(const char* log);
private:
    LoggerManager();
    LoggerManager(const LoggerManager&);
    
    static LoggerManager m_Instance;
    
    typedef std::map<const char*,Logger*> LoggerMap;
    LoggerMap m_LoggerMap;
};

} // namespace Sprocket

#endif // __LOGGERMANAGER_H__